﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YXQ.Common.Helper
{
  public  static class EnumHelper
    {
       private const string bianzhi = "编制";
       private const string baopi = "报批";
       private const string wancheng = "完成";
       private const string qita = "其他";
       private const string kong = "";
       private const string xianchangzuantan = "现场钻探";
       private const string kanchabaogao = "勘察报告";
       private const string chutu = "出图";
       private const string baosheng = "报审";
       private const string baogao = "报告";
       private const string jiesuanziliao = "结算资料接收";
       private const string jiesuanwanbi = "结算办理完毕";
       private const string songsheng = "送审"; 
       private const string bixuan = "比选";
       private const string yaoqing = "邀请招标";
       private const string gongkai = "公开招标";
       private const string jinzhengxing = "竞争性谈判";
       private const string yi = "已";
       private const string wei = "未";
       private const string shi = "是";
       private const string fou = "否";
       private const string yiyijiao = "已移交";
       private const string weiyijiao = "未移交";

      public static string EnumConvert(int tpid,int? enm){
          var rtn = string.Empty;
          switch (tpid)
          {
                  //报建部
              case 1:
                  switch (enm)
                  {
                      case -1:
                          rtn = kong;
                          break;
                      case 0:
                          rtn = bianzhi;
                          break;
                      case 1:
                          rtn = baopi;
                          break;
                      case 2:
                          rtn = wancheng;
                          break;
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn =kong;
                          break;
                  }
                  break;
                  //设计部
              case 2:
                  switch (enm) {
                      case 0:
                          rtn = xianchangzuantan;
                          break;
                      case 1:
                          rtn = kanchabaogao;
                          break;
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;
                  //设计部
              case 3:
                  switch (enm) {
                      case 0:
                          rtn = bianzhi;
                          break;
                      case 1:
                          rtn = chutu;
                          break;
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;
                  //设计部
              case 4:
                  switch (enm) {
                      case 0:
                          rtn = baosheng;
                          break;
                      case 1:
                          rtn = baogao;
                          break;
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;
                  //预算结算
              case 5:
                  switch (enm)
                  {
                      case 0:
                          rtn = bianzhi;
                          break;
                      case 1:
                          rtn = baogao;
                          break;
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;
              //预算结算
              case 6:
                  switch (enm)
                  {
                      case 0:
                          rtn = baopi;
                          break;
                      case 1:
                          rtn = baogao;
                          break;
                      case 2:
                          rtn = wancheng;
                          break;
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;
               //结算审查
              case 7:
                  switch (enm)
                  {
                      case 0:
                          rtn = jiesuanziliao;
                          break;
                      case 1:
                          rtn = jiesuanwanbi;
                          break; 
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;
              //结算评审
              case 8:
                  switch (enm)
                  {
                      case 0:
                          rtn = songsheng;
                          break; 
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;
                  //招标办招标方式
              case 9:
                  switch (enm)
                  {
                      case 0:
                          rtn = bixuan;
                          break;
                      case 1:
                          rtn = jinzhengxing;
                          break;
                      case 2:
                          rtn = yaoqing;
                          break;
                      case 3:
                          rtn = gongkai;
                          break;
                      case 4:
                          rtn = qita;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;
                  //已/未
              case 10:
                  switch (enm)
                  {
                      case 0:
                          rtn = yi;
                          break;
                      case 1:
                          rtn = wei;
                          break; 
                      default:
                          rtn = wei;
                          break;
                  }
                  break;
              //是/否
              case 11:
                  switch (enm)
                  {
                      case 0:
                          rtn = shi;
                          break;
                      case 1:
                          rtn = fou;
                          break;
                      default:
                          rtn = fou;
                          break;
                  }
                  break;
              //已移交/未移交
              case 12:
                  switch (enm)
                  {
                      case 0:
                          rtn = yiyijiao;
                          break;
                      case 1:
                          rtn = weiyijiao;
                          break;
                      default:
                          rtn = kong;
                          break;
                  }
                  break;


          }
          return rtn;
      }

    }
}
